<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    
  </style>
</head>
<body>
  <div id="app">
    <ul>
      <li v-for="(stu, index) in stus" :key="index">
        <h4>学生姓名: {{stu.name}}</h4>
        <p>学生年龄: {{stu.age}}</p>
        <p>学生性别: {{stu.gender}}</p>
      </li>
    </ul>

    <div v-for="(floor, index) in floors" :key="index">
      <h4>
        {{floor.title}}
      </h4>
      <ul>
        <li v-for="(item,index2) in floor.items" :key="index2">
          <h4>商品名:{{index+1.}}楼 {{item.name}}</h4>
          <p>商品价格: {{item.price}}</p>
        </li>
      </ul>
    </div>
  </div>
  <script src="./vue.global.js"></script>
  <script>
    const { createApp } = Vue;
    const app = createApp({
      data(){
        return {
          stus: [
            {
              name: '小明',
              age: 18,
              gender: '男'
            },
            {
              name: '小红',
              age: 19,
              gender: '女'
            },
            {
              name: '小花',
              age: 20,
              gender: '女'
            }
          ],
          floors: [
            {
              title: '手机',
              items: [
                {
                  name: '商品1',
                  price: 10
                },
                {
                  name: '商品2',
                  price: 20
                },
                {
                  name: '商品3',
                  price: 30
                }
              ]
            },
            {
              title: '电脑',
              items: [
                {
                  name: '电脑-商品1',
                  price: 10
                },
                {
                  name: '电脑-商品2',
                  price: 20
                },
                {
                  name: '电脑-商品3',
                  price: 30
                }
              ]
            }
          ]
        }
      }
    })
    app.mount('#app')
  </script>
</body>
</html>